﻿<UserControl x:Class="UCCLIGHT2.Player.Player"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:Smooth ="clr-namespace:Microsoft.Web.Media.SmoothStreaming;assembly=Microsoft.Web.Media.SmoothStreaming"
    mc:Ignorable="d"
   Height="510" Width="640">
    <UserControl.Resources>
        <Storyboard x:Name="mediaInfomation_VisibleStoryboard">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="mediaInfomationGrid" Storyboard.TargetProperty="(UIElement.Opacity)">
                <!--<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1"/>-->
                <EasingDoubleKeyFrame KeyTime="00:00:00.4000000" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="mediaInfomation_HiddenStoryboard">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="mediaInfomationGrid" Storyboard.TargetProperty="(UIElement.Opacity)">
                <EasingDoubleKeyFrame KeyTime="00:00:00.4000000" Value="0"/>
                <!--<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>-->
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="ControlGrid_VisibleStoryboard">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="controlGrid" Storyboard.TargetProperty="(UIElement.Opacity)">
                <EasingDoubleKeyFrame KeyTime="00:00:00.4000000" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="ControlGrid_HiddenStoryboard">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="controlGrid" Storyboard.TargetProperty="(UIElement.Opacity)">
                <EasingDoubleKeyFrame KeyTime="00:00:00.4000000" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
    </UserControl.Resources>

    <Grid x:Name="LayoutRoot" Margin="3" Background="Black">

        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="30"/>
        </Grid.RowDefinitions>

        <Grid x:Name="mediaGrid">
            <Smooth:SmoothStreamingMediaElement  Grid.Row="0" Grid.Column="0" Margin="0" 
    			x:Name="mediaElement"
                AutoPlay="True"      
    			Stretch="Uniform" />
            
            <Grid x:Name="mediaInfomationGrid" Margin="0" VerticalAlignment="Top" Height="100" Opacity="0">
                <Rectangle x:Name="rectInfomationGridBackGround" Fill="#CC6E6E6E" RadiusY="5" Stroke="#FF666666" StrokeThickness="2"/>
                <TextBlock x:Name="tbMediaTitle" HorizontalAlignment="Center" VerticalAlignment="Center" Text="UCC 제목" TextWrapping="Wrap" Foreground="White" FontSize="26.667" FontWeight="Bold"/>
            </Grid>

        </Grid>
        <Grid x:Name="controlGrid" Grid.Column="0" Grid.Row="1">
            <Grid.Background>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FF3D3D3D" Offset="0"/>
                    <GradientStop Color="#FF333333" Offset="0.603"/>
                    <GradientStop Color="Black" Offset="1"/>
                    <GradientStop Color="#FF4C4C4C" Offset="0.452"/>
                </LinearGradientBrush>
            </Grid.Background>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="30" MaxWidth="30" MinWidth="30"/>
                <ColumnDefinition Width="30" MaxWidth="30" MinWidth="30"/>
                <ColumnDefinition MinWidth="100"/>
                <ColumnDefinition Width="80"/>
                <ColumnDefinition Width="30"/>
                <ColumnDefinition Width="100"/>
                <ColumnDefinition Width="30"/>
            </Grid.ColumnDefinitions>

            <Button x:Name="btnPlay" Margin="2.5,0,0,0" Content="▶" HorizontalAlignment="Left" Width="25" Height="25" />
            <Button x:Name="btnStop" Margin="0" Content="■" Width="25" Height="25" Grid.Column="1" d:LayoutOverrides="GridBox"  />

            <Grid x:Name="seekGrid" Margin="3,0" Height="10" VerticalAlignment="Center" Grid.Column="2" >
                <Rectangle x:Name="seekBack" Fill="LightGray"  HorizontalAlignment="Stretch"/>
                <Rectangle x:Name="downloadBar" Fill="Gray" HorizontalAlignment="Left"/>
                <Rectangle x:Name="seekBar" Fill="Blue" HorizontalAlignment="Left"/>
            </Grid>
            <TextBlock x:Name="tbSeek" Margin="0" Text="00:00 / 00:00" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="3" d:LayoutOverrides="GridBox" Foreground="White" />
            <Button x:Name="btnFullScreen" Margin="0" Width="25" Height="25" Content="Full" Grid.Column="4" />
            <Grid x:Name="volumeGrid" Margin="0" Grid.Column="5">
                <Button x:Name="btnVolume" Content="♨" Width="25" Height="25" HorizontalAlignment="Left" />
                <Slider x:Name="sliderVolume" Minimum="0" Maximum="1" Value="{Binding Volume, ElementName=mediaElement, Mode=TwoWay}" Margin="27,0,0,0" VerticalAlignment="Center" />
            </Grid>
            <Button x:Name="btnGetSource" Margin="0" Content="▲" Width="25" Height="25" Grid.Column="6"  />
        </Grid>

    </Grid>
</UserControl>
